#!/bin/sh
# The line above is called the "shebang" line.  It's used to tell the shell which program should run the commands below.

# This is a variable.  Note the missing space around the equal sign, and the lack of quotation marks.
CLASSDIR=classes

# Removes the $CLASSDIR directory.  The arguments -Rf allow it to delete the directory and force deletion of files.
rm -Rf $CLASSDIR

# Creates the directory $CLASSDIR.  The -p argument tells it to silently fail if $CLASSDIR already exists.
mkdir -p $CLASSDIR

# 'javac' is the Java compiler executable name.
#  -sourcepath tells it to look for source files in src1, src2, and src3.
#  -d classes - the directory to place *.class files.  *.class files are the compiled version of *.java source files.
# Finally the file to compile is given.  The other classes are compiled as well since they are used by TestAll.
javac -sourcepath src1:src2:src3 -d classes src3/ca/uoit/csci2020u/executables/TestAll.java
